LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

ifeq ($(DEVICE_TYPE),MEDIASERVER)
LOCAL_MODULE     := platinum-MediaServer
LOCAL_SRC_FILES += FileMediaServerTest.cpp
endif

ifeq ($(DEVICE_TYPE),MEDIARENDER)
LOCAL_MODULE     := platinum-MediaRenderer
LOCAL_SRC_FILES += MediaRendererTest.cpp
endif

ifeq ($(DEVICE_TYPE),MEDIACONTROLLER)
LOCAL_MODULE     := platinum-MediaController
LOCAL_SRC_FILES += MediaControllerTest.cpp
endif

LOCAL_LDLIBS     += -llog


PLT_ROOT := $(LOCAL_PATH)
PLT_SRC_ROOT := $(PLT_ROOT)
LOCAL_C_INCLUDES += $(PLT_SRC_ROOT)
LOCAL_C_INCLUDES += $(PLT_SRC_ROOT)/MediaServer
LOCAL_C_INCLUDES += $(PLT_SRC_ROOT)/MediaRenderer
LOCAL_C_INCLUDES += $(PLT_SRC_ROOT)/MediaController
LOCAL_C_INCLUDES += $(PLT_SRC_ROOT)/MediaConnect

LOCAL_C_INCLUDES += $(PLT_SRC_ROOT)/NptCore
LOCAL_C_INCLUDES += $(PLT_SRC_ROOT)/Platinum
LOCAL_C_INCLUDES += $(PLT_SRC_ROOT)/PltCore
LOCAL_C_INCLUDES += $(PLT_SRC_ROOT)/Extras

#MY_CPP_LIST := $(wildcard $(LOCAL_PATH)/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/MediaServer/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/MediaRenderer/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/MediaController/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/MediaConnect/*.cpp)

MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/NptCore/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/PltCore/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/System/Bsd/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/System/Posix/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/System/StdC/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/Extras/*.cpp)
LOCAL_SRC_FILES += $(MY_CPP_LIST:$(LOCAL_PATH)/%=%)

LOCAL_CFLAGS += -DNPT_CONFIG_ENABLE_LOGGING

ifeq ($(NDK_DEBUG),1)
LOCAL_LDLIBS += -L$(PLT_ROOT)/Build/Targets/arm-android-linux/Debug
else
LOCAL_LDLIBS += -L$(PLT_ROOT)/Build/Targets/arm-android-linux/Release
endif

#include $(BUILD_SHARED_LIBRARY)
include $(BUILD_EXECUTABLE)
